<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('disclosures', function (Blueprint $table) {
            $table->id();
            $table->string('title')->index();
            $table->unsignedBigInteger('push_id')->default(0)->comment('发布人');
            $table->unsignedBigInteger('project_id')->index()->comment('所属项目ID');
            $table->unsignedBigInteger('type_id')->index()->comment('交底类型');
            $table->unsignedBigInteger('region_id')->index()->comment('区域');
            $table->unsignedBigInteger('schedule_id')->index()->comment('进度');
            $table->unsignedBigInteger('clicks')->default(0)->comment('发布人');
            $table->string('videos')->nullable()->comment('视频');
            $table->string('files')->nullable()->comment('文件');
            $table->string('content')->nullable()->comment('图文详情');
            $table->tinyInteger('status')->index()->default(1)->comment('1：进行中；2：结束');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('disclosures');
    }
};
